\hypertarget{tcp_server_8c}{
\section{Referência ao ficheiro tcpServer.c}
\label{tcp_server_8c}\index{tcpServer.c@{tcpServer.c}}
}
{\tt \#include $<$sys/types.h$>$}\par
{\tt \#include $<$sys/socket.h$>$}\par
{\tt \#include $<$netinet/in.h$>$}\par
{\tt \#include $<$arpa/inet.h$>$}\par
{\tt \#include $<$netdb.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
\subsection*{Macros}
\begin{CompactItemize}
\item 
\#define \hyperlink{tcp_server_8c_a90cac659d18e8ef6294c7ae337f6b58}{SUCCESS}~0
\item 
\#define \hyperlink{tcp_server_8c_8fe83ac76edc595f6b98cd4a4127aed5}{ERROR}~1
\item 
\#define \hyperlink{tcp_server_8c_6fd2b788cc016acd19820ddb30e78c1f}{END\_\-LINE}~0x0
\item 
\#define \hyperlink{tcp_server_8c_c42367fe5c999ec6650de83e9d72fe8c}{SERVER\_\-PORT}~1500
\item 
\#define \hyperlink{tcp_server_8c_a24597a54a085c6c2c33b64138f09eff}{MAX\_\-MSG}~100
\end{CompactItemize}
\subsection*{Funções}
\begin{CompactItemize}
\item 
int \hyperlink{tcp_server_8c_89682a2d7013984f72708bfce12e78b8}{read\_\-line} ()
\item 
int \hyperlink{tcp_server_8c_0ddf1224851353fc92bfbff6f499fa97}{main} (int argc, char $\ast$argv\mbox{[}$\,$\mbox{]})
\item 
int \hyperlink{tcp_server_8c_d0cbf67c79b321499f8348e6c1938d10}{read\_\-line} (int newSd, char $\ast$line\_\-to\_\-return)
\end{CompactItemize}


\subsection{Documentação das macros}
\hypertarget{tcp_server_8c_6fd2b788cc016acd19820ddb30e78c1f}{
\index{tcpServer.c@{tcpServer.c}!END\_\-LINE@{END\_\-LINE}}
\index{END\_\-LINE@{END\_\-LINE}!tcpServer.c@{tcpServer.c}}
\subsubsection[END\_\-LINE]{\setlength{\rightskip}{0pt plus 5cm}\#define END\_\-LINE~0x0}}
\label{tcp_server_8c_6fd2b788cc016acd19820ddb30e78c1f}




Definido na linha 17 do ficheiro tcpServer.c.

Referenciado por read\_\-line().\hypertarget{tcp_server_8c_8fe83ac76edc595f6b98cd4a4127aed5}{
\index{tcpServer.c@{tcpServer.c}!ERROR@{ERROR}}
\index{ERROR@{ERROR}!tcpServer.c@{tcpServer.c}}
\subsubsection[ERROR]{\setlength{\rightskip}{0pt plus 5cm}\#define ERROR~1}}
\label{tcp_server_8c_8fe83ac76edc595f6b98cd4a4127aed5}




Definido na linha 15 do ficheiro tcpServer.c.

Referenciado por main() e read\_\-line().\hypertarget{tcp_server_8c_a24597a54a085c6c2c33b64138f09eff}{
\index{tcpServer.c@{tcpServer.c}!MAX\_\-MSG@{MAX\_\-MSG}}
\index{MAX\_\-MSG@{MAX\_\-MSG}!tcpServer.c@{tcpServer.c}}
\subsubsection[MAX\_\-MSG]{\setlength{\rightskip}{0pt plus 5cm}\#define MAX\_\-MSG~100}}
\label{tcp_server_8c_a24597a54a085c6c2c33b64138f09eff}




Definido na linha 19 do ficheiro tcpServer.c.\hypertarget{tcp_server_8c_c42367fe5c999ec6650de83e9d72fe8c}{
\index{tcpServer.c@{tcpServer.c}!SERVER\_\-PORT@{SERVER\_\-PORT}}
\index{SERVER\_\-PORT@{SERVER\_\-PORT}!tcpServer.c@{tcpServer.c}}
\subsubsection[SERVER\_\-PORT]{\setlength{\rightskip}{0pt plus 5cm}\#define SERVER\_\-PORT~1500}}
\label{tcp_server_8c_c42367fe5c999ec6650de83e9d72fe8c}




Definido na linha 18 do ficheiro tcpServer.c.\hypertarget{tcp_server_8c_a90cac659d18e8ef6294c7ae337f6b58}{
\index{tcpServer.c@{tcpServer.c}!SUCCESS@{SUCCESS}}
\index{SUCCESS@{SUCCESS}!tcpServer.c@{tcpServer.c}}
\subsubsection[SUCCESS]{\setlength{\rightskip}{0pt plus 5cm}\#define SUCCESS~0}}
\label{tcp_server_8c_a90cac659d18e8ef6294c7ae337f6b58}




Definido na linha 14 do ficheiro tcpServer.c.

\subsection{Documentação das funções}
\hypertarget{tcp_server_8c_0ddf1224851353fc92bfbff6f499fa97}{
\index{tcpServer.c@{tcpServer.c}!main@{main}}
\index{main@{main}!tcpServer.c@{tcpServer.c}}
\subsubsection[main]{\setlength{\rightskip}{0pt plus 5cm}int main (int {\em argc}, \/  char $\ast$ {\em argv}\mbox{[}$\,$\mbox{]})}}
\label{tcp_server_8c_0ddf1224851353fc92bfbff6f499fa97}




Definido na linha 24 do ficheiro tcpServer.c.

Referências ERROR, MAX\_\-MSG, read\_\-line() e SERVER\_\-PORT.\hypertarget{tcp_server_8c_d0cbf67c79b321499f8348e6c1938d10}{
\index{tcpServer.c@{tcpServer.c}!read\_\-line@{read\_\-line}}
\index{read\_\-line@{read\_\-line}!tcpServer.c@{tcpServer.c}}
\subsubsection[read\_\-line]{\setlength{\rightskip}{0pt plus 5cm}int read\_\-line (int {\em newSd}, \/  char $\ast$ {\em line\_\-to\_\-return})}}
\label{tcp_server_8c_d0cbf67c79b321499f8348e6c1938d10}




Definido na linha 93 do ficheiro tcpServer.c.

Referências END\_\-LINE, ERROR e MAX\_\-MSG.\hypertarget{tcp_server_8c_89682a2d7013984f72708bfce12e78b8}{
\index{tcpServer.c@{tcpServer.c}!read\_\-line@{read\_\-line}}
\index{read\_\-line@{read\_\-line}!tcpServer.c@{tcpServer.c}}
\subsubsection[read\_\-line]{\setlength{\rightskip}{0pt plus 5cm}int read\_\-line ()}}
\label{tcp_server_8c_89682a2d7013984f72708bfce12e78b8}




Referenciado por main().